package cn.springboot.mapper;

import cn.springboot.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {

    @Select("SELECT * FROM USER WHERE USERNAME=#{username}")
    User findByName(@Param("username")String username);

    @Insert("INSERT INTO USER(USERNAME,PASSWORD) VALUES(#{username},#{password})")
    int insert(@Param("username")String username,@Param("password")String password);
}
